#pragma once
#include "nnse_support.h"

namespace SimpleGUI
{
	template <class T, class U> public ref class MLP : public System::Windows::Forms::Form
	{
		// Constructor and Destructor
			public: MLP(nnse::MLP<T, U>^ p);
			protected: virtual ~MLP();
		// Member Variables
			private: System::ComponentModel::Container^ components;
			private: System::Windows::Forms::Label^  number_label;
			private: System::Windows::Forms::TextBox^  number_textBox;
			private: System::Windows::Forms::Label^  seed_label;
			private: System::Windows::Forms::TextBox^  seed_textBox;
			private: System::Windows::Forms::Label^  number_of_iterations_label;
			private: System::Windows::Forms::TextBox^  number_of_iterations_textBox;
			private: System::Windows::Forms::Label^  learning_rate_label;
			private: System::Windows::Forms::TextBox^  learning_rate_textBox;
			private: System::Windows::Forms::Label^  momentum_flag_label;
			private: System::Windows::Forms::TextBox^  momentum_flag_textBox;
			private: System::Windows::Forms::Label^  momentum_value_label;
			private: System::Windows::Forms::TextBox^  momentum_value_textBox;
			private: System::Windows::Forms::Label^  number_of_hidden_layers_label;
			private: System::Windows::Forms::TextBox^  number_of_hidden_layers_textBox;
			private: System::Windows::Forms::Button^  view_button;
			private: nnse::MLP<T, U>^ parent;
		// GUI Functions	
			private: System::Void view_button_Click(System::Object^  sender, System::EventArgs^  e);
			private: System::Void form_closed(System::Object^  sender, System::Windows::Forms::FormClosedEventArgs^  e);
			public: System::Void update_form();
#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->number_label = (gcnew System::Windows::Forms::Label());
			this->seed_label = (gcnew System::Windows::Forms::Label());
			this->number_of_iterations_label = (gcnew System::Windows::Forms::Label());
			this->learning_rate_label = (gcnew System::Windows::Forms::Label());
			this->momentum_flag_label = (gcnew System::Windows::Forms::Label());
			this->momentum_value_label = (gcnew System::Windows::Forms::Label());
			this->number_of_hidden_layers_label = (gcnew System::Windows::Forms::Label());
			this->number_textBox = (gcnew System::Windows::Forms::TextBox());
			this->seed_textBox = (gcnew System::Windows::Forms::TextBox());
			this->number_of_iterations_textBox = (gcnew System::Windows::Forms::TextBox());
			this->learning_rate_textBox = (gcnew System::Windows::Forms::TextBox());
			this->momentum_flag_textBox = (gcnew System::Windows::Forms::TextBox());
			this->momentum_value_textBox = (gcnew System::Windows::Forms::TextBox());
			this->number_of_hidden_layers_textBox = (gcnew System::Windows::Forms::TextBox());
			this->view_button = (gcnew System::Windows::Forms::Button());
			this->SuspendLayout();
			// 
			// number_label
			// 
			this->number_label->AutoSize = true;
			this->number_label->Location = System::Drawing::Point(12, 10);
			this->number_label->Name = L"number_label";
			this->number_label->Size = System::Drawing::Size(47, 13);
			this->number_label->TabIndex = 0;
			this->number_label->Text = L"Number:";
			// 
			// seed_label
			// 
			this->seed_label->AutoSize = true;
			this->seed_label->Location = System::Drawing::Point(12, 40);
			this->seed_label->Name = L"seed_label";
			this->seed_label->Size = System::Drawing::Size(35, 13);
			this->seed_label->TabIndex = 1;
			this->seed_label->Text = L"Seed:";
			// 
			// number_of_iterations_label
			// 
			this->number_of_iterations_label->AutoSize = true;
			this->number_of_iterations_label->Location = System::Drawing::Point(12, 70);
			this->number_of_iterations_label->Name = L"number_of_iterations_label";
			this->number_of_iterations_label->Size = System::Drawing::Size(105, 13);
			this->number_of_iterations_label->TabIndex = 2;
			this->number_of_iterations_label->Text = L"Number of Iterations:";
			// 
			// learning_rate_label
			// 
			this->learning_rate_label->AutoSize = true;
			this->learning_rate_label->Location = System::Drawing::Point(12, 100);
			this->learning_rate_label->Name = L"learning_rate_label";
			this->learning_rate_label->Size = System::Drawing::Size(77, 13);
			this->learning_rate_label->TabIndex = 3;
			this->learning_rate_label->Text = L"Learning Rate:";
			// 
			// momentum_flag_label
			// 
			this->momentum_flag_label->AutoSize = true;
			this->momentum_flag_label->Location = System::Drawing::Point(12, 130);
			this->momentum_flag_label->Name = L"momentum_flag_label";
			this->momentum_flag_label->Size = System::Drawing::Size(85, 13);
			this->momentum_flag_label->TabIndex = 4;
			this->momentum_flag_label->Text = L"Momentum Flag:";
			// 
			// momentum_value_label
			// 
			this->momentum_value_label->AutoSize = true;
			this->momentum_value_label->Location = System::Drawing::Point(12, 160);
			this->momentum_value_label->Name = L"momentum_value_label";
			this->momentum_value_label->Size = System::Drawing::Size(92, 13);
			this->momentum_value_label->TabIndex = 5;
			this->momentum_value_label->Text = L"Momentum Value:";
			// 
			// number_of_hidden_layers_label
			// 
			this->number_of_hidden_layers_label->AutoSize = true;
			this->number_of_hidden_layers_label->Location = System::Drawing::Point(12, 190);
			this->number_of_hidden_layers_label->Name = L"number_of_hidden_layers_label";
			this->number_of_hidden_layers_label->Size = System::Drawing::Size(130, 13);
			this->number_of_hidden_layers_label->TabIndex = 6;
			this->number_of_hidden_layers_label->Text = L"Number of Hidden Layers:";
			// 
			// number_textBox
			// 
			this->number_textBox->Location = System::Drawing::Point(145, 6);
			this->number_textBox->Name = L"number_textBox";
			this->number_textBox->Size = System::Drawing::Size(100, 20);
			this->number_textBox->TabIndex = 7;
			// 
			// seed_textBox
			// 
			this->seed_textBox->Location = System::Drawing::Point(145, 36);
			this->seed_textBox->Name = L"seed_textBox";
			this->seed_textBox->Size = System::Drawing::Size(100, 20);
			this->seed_textBox->TabIndex = 8;
			// 
			// number_of_iterations_textBox
			// 
			this->number_of_iterations_textBox->Location = System::Drawing::Point(145, 66);
			this->number_of_iterations_textBox->Name = L"number_of_iterations_textBox";
			this->number_of_iterations_textBox->Size = System::Drawing::Size(100, 20);
			this->number_of_iterations_textBox->TabIndex = 9;
			// 
			// learning_rate_textBox
			// 
			this->learning_rate_textBox->Location = System::Drawing::Point(145, 96);
			this->learning_rate_textBox->Name = L"learning_rate_textBox";
			this->learning_rate_textBox->Size = System::Drawing::Size(100, 20);
			this->learning_rate_textBox->TabIndex = 10;
			// 
			// momentum_flag_textBox
			// 
			this->momentum_flag_textBox->Location = System::Drawing::Point(145, 126);
			this->momentum_flag_textBox->Name = L"momentum_flag_textBox";
			this->momentum_flag_textBox->Size = System::Drawing::Size(100, 20);
			this->momentum_flag_textBox->TabIndex = 11;
			// 
			// momentum_value_textBox
			// 
			this->momentum_value_textBox->Location = System::Drawing::Point(145, 156);
			this->momentum_value_textBox->Name = L"momentum_value_textBox";
			this->momentum_value_textBox->Size = System::Drawing::Size(100, 20);
			this->momentum_value_textBox->TabIndex = 12;
			// 
			// number_of_hidden_layers_textBox
			// 
			this->number_of_hidden_layers_textBox->Location = System::Drawing::Point(145, 186);
			this->number_of_hidden_layers_textBox->Name = L"number_of_hidden_layers_textBox";
			this->number_of_hidden_layers_textBox->Size = System::Drawing::Size(100, 20);
			this->number_of_hidden_layers_textBox->TabIndex = 13;
			// 
			// view_button
			// 
			this->view_button->Location = System::Drawing::Point(15, 223);
			this->view_button->Name = L"view_button";
			this->view_button->Size = System::Drawing::Size(230, 23);
			this->view_button->TabIndex = 14;
			this->view_button->Text = L"View Layers in this MLP";
			this->view_button->UseVisualStyleBackColor = true;
			this->view_button->Click += gcnew System::EventHandler(this, &MLP::view_button_Click);
			// 
			// MLP
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(262, 254);
			this->Controls->Add(this->view_button);
			this->Controls->Add(this->number_of_hidden_layers_textBox);
			this->Controls->Add(this->momentum_value_textBox);
			this->Controls->Add(this->momentum_flag_textBox);
			this->Controls->Add(this->learning_rate_textBox);
			this->Controls->Add(this->number_of_iterations_textBox);
			this->Controls->Add(this->seed_textBox);
			this->Controls->Add(this->number_textBox);
			this->Controls->Add(this->number_of_hidden_layers_label);
			this->Controls->Add(this->momentum_value_label);
			this->Controls->Add(this->momentum_flag_label);
			this->Controls->Add(this->learning_rate_label);
			this->Controls->Add(this->number_of_iterations_label);
			this->Controls->Add(this->seed_label);
			this->Controls->Add(this->number_label);
			this->Name = L"MLP";
			this->Text = L"MLP";
			this->FormClosed += gcnew System::Windows::Forms::FormClosedEventHandler(this, &MLP::form_closed);
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	};
}
